from rest_framework import serializers

from books.models import BookInfo


class BookModelSerializer(serializers.ModelSerializer):
    class Meta:
        model = BookInfo
        fields = '__all__'

        extra_kwargs = {
            "bread": {
                "max_value": 500,
                "min_value": 0,
            },
            "bcomment": {
                "max_value": 500,
                "min_value": 0,
            },
        }
